<template>
	<view class="page-box">
		<uni-section title="您是否持有房地产经纪人资格证？" type="line"></uni-section>
		<radio-group class="form-box" @change="radioChange">
			<view>
				<view>否</view>
				<radio value="0" color="#f13b32"  checked="true"/>
			</view>
			<view>
				<view>是</view>
				<radio value="1" color="#f13b32" />
			</view>
		</radio-group>
		<view class="big-btn" @click="nextPage">下一步</view>
	</view>
</template>

<script>
	import uniSection from '@/components/uni-section/uni-section.vue'
	export default {
		onLoad(options) {			
			this.userInfo = JSON.parse(decodeURIComponent(options.param))				
			console.log(this.userInfo)			
		},
		components: {
			uniSection
		},
		data() {
			return {
				chooseType: 0, // 1否 2是
				userInfo:{}
			}
		},
		methods: {
			radioChange (e) {
				this.chooseType = e.detail.value
				this.userInfo.authStatus = parseInt(e.detail.value)
			},
			nextPage () {
				uni.navigateTo({
					url: '/pages/authentication/isCertificate?chooseType=' + this.chooseType + '&param=' + encodeURIComponent(JSON.stringify(this.userInfo))
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.page-box {
		padding-bottom: 88rpx;
		box-sizing: border-box;
		
		/deep/ .uni-section {
			margin: 5vw;
			background: #FFF;
		}
		
		/deep/ .line {
			background-color: #f13b32;
		}
	}
	
	.form-box {
		margin: 5vw;		
		box-sizing: border-box;
		background: #FFF;
		width: auto;
		border-radius: 5rpx;
		
		> view {
			display: flex;
			    padding: 0 25rpx;
			box-sizing: border-box;
			border-bottom: 1px solid #e5e5e5;
			box-sizing: border-box;
			justify-content: space-between;
			align-items: center;
			font-size: 24rpx;
			
			&:last-of-type {
				border-bottom: none;
			}
			
			view {
				width: 140rpx;
				line-height: 80rpx;
				font-size: 24rpx;
			}
		}
	}
	
	.big-btn {
		position: fixed;
		left: 0;
		bottom: 0;
		width: 100%;
		line-height: 88rpx;
		text-align: center;
		color: #FFF;
		background: #f13b32;
	}
</style>
